home *** CD-ROM | disk | FTP | other *** search
- /*
- * Port display program by John Crookshank
- *
- * Shows all active ports and sorts into a neat display.
- */
-
- names = SHOW(ports)
- count = 0
- pad = ' '
- lf = '0a'x
-
- do while names ~= ""
- count = count + 1
- parse var names name.count " " names
- l = length(name.count)
- name.count = name.count||left(pad,(25-l))
- end
-
- say lf lf pad'Listing of' count 'active ports:'
- say pad '--------------------------'lf lf
-
- counter = 1
- do until counter > count
- secname = counter + 1
- third = counter + 2
- if secname > count then name.secname = ' '
- if third > count then name.third = ' '
- say name.counter||name.secname||name.third
- counter = counter + 3
- end
-